package com.wjy.common.controller;

import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@CacheConfig(cacheNames = "TestController")
@Controller
public class TestController {

    @Cacheable(sync = true)
    @RequestMapping(value = "/getC", method = RequestMethod.GET)
    @ResponseBody
    public String getC() {
        return "I'm TestController";
    }

}
